{% extends "base.html" %}

{% block nav %}
<li class="active">
    <i class="fa fa-user"></i> 审核用户
</li>
{% endblock %}

{% block content %}
	<div class="col-lg-12">
		<table class="table table-striped">
		  <thead>
			<tr>
			<th>用户名</th>
			<th>手机号</th>
			<th>班级类型</th>
			<th>班级号</th>
			<th>激活用户</th>
			<th>删除用户</th>
			</tr>
		  <thead>
		  <tbody>
		  {% if result %}

		  	{% if result['result'] %}
		  		{% if result['result']['data'] %}
		  			{% for id,phone,username,class_type,class_num,status in result['result']['data'] %}
					<tr>
					  <td >{{ username }}</td>
					  <td >{{ phone }}</td>
					  <td >{{ class_type }}</td>
					  <td >{{ class_num }}期班</td>
					  <td >
					  <form method="POST" action="/user/info">
					  	<input  type='hidden' name='phone' value= '{{ phone }}'>
					  	{% if status == 1 %}
					  		<input class="btn btn-success btn-sm" type='submit' value='激活' disabled="disabled">
					  	{% else %}
					  		<input class="btn btn-success btn-sm" type='submit' value='激活'>
					  	{% endif %}
					  </form>
					  </td>
					  <td>
					  	<a class="btn  btn-danger btn-sm" href="#">删除用户</a>
					  </td>
					</tr>
				  </tbody>
				  {% endfor %}
				{% endif %}
		  	{% endif %}
		  	<!-- code不等于0-->
		  {% endif %}
		</table>
	</div>
{% endblock %}
